package com.vavr.checkincms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.vavr.checkincms.domain.bo.MeetingParticipantBO;
import com.vavr.checkincms.domain.data.MeetingParticipantDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * MeetingParticipantMapper
 *
 * @since 2024.08
 */
@Mapper
public interface MeetingParticipantMapper extends BaseMapper<MeetingParticipantDO> {

    @Update(" update meeting_id,config_id,config_value,config_name,config_desc,sort "
            + " from  meeting_config where config_id = #{meetingId} ")
    int updateMeetingUsers(MeetingParticipantBO bo);


    @Select(" select user_id as userId "
            + " from  meeting_users where meeting_id = #{meetingId} and open_id = #{openId}  ")
    String queryParticipantByOpenId(@Param("openId") String openId, @Param("meetingId") String meetingId);
}
